fix flaky search index application#26795
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🟡 Playwright Results — all passed (20 flaky)✅ 3419 passed · ❌ 0 failed · 🟡 20 flaky · ⏭️ 216 skipped
🟡 20 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts
Outdated
Show resolved
Hide resolved
…/open-metadata/OpenMetadata into fix-searchIndexApplication-specs
| await apiContext.post('/api/v1/apps', { | ||
| data: { | ||
| name: 'SearchIndexingApplication', | ||
| displayName: 'Search Indexing', | ||
| appConfiguration, | ||
| appSchedule: { scheduleTimeline: 'None' }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
💡 Edge Case: Self-healing API POST lacks response-status check
The self-healing guard (lines 171-178) creates the app via apiContext.post('/api/v1/apps', …) but never inspects the response. If the POST fails (e.g., 400 due to a schema change or 500), the test will proceed as if the app is installed, leading to a confusing downstream failure that obscures the real cause.
Adding a status assertion gives a clear, early failure message.
Suggested fix:
const installRes = await apiContext.post('/api/v1/apps', {
data: {
name: 'SearchIndexingApplication',
displayName: 'Search Indexing',
appConfiguration,
appSchedule: { scheduleTimeline: 'None' },
},
});
expect(installRes.ok()).toBeTruthy();
Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsStabilizes flaky search index application tests with targeted fixes. Consider adding response-status validation to the self-healing API POST to ensure proper error handling. 💡 Edge Case: Self-healing API POST lacks response-status check📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchIndexApplication.spec.ts:171-178 The self-healing guard (lines 171-178) creates the app via Adding a status assertion gives a clear, early failure message. Suggested fix🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
|
Failed to cherry-pick changes to the 1.12.4 branch. |
* fix flaky search index application * fix lint issues * address review comments --------- Co-authored-by: Shrabanti Paul <shrabantipaul@Shrabantis-MacBook-Pro.local>



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
installSearchIndexApplicationfunction to reduce duplication and enable recovery from failed retriesThis will update automatically on new commits.